import { createStore, createLogger } from 'vuex'
import createPersistedstate from 'vuex-persistedstate'

import user from './modules/user'
import cart from './modules/cart'

export default createStore({
  state: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    user,
    cart
  },
  plugins: [
    createPersistedstate(
      {
        key: 'rabbit-137',
        paths: ['user', 'cart']
      }
    ),
    // 操作vuex数据，控制台或有日志
    createLogger()
  ]
})
